# -*- coding: utf-8 -*-
from pathlib import Path
import logging
import pdb

from ..my_exception import MyException

logger = logging.getLogger(__name__)

def file_exist_or_die(file):
    p = Path(file)
    if not p.exists():
        raise MyException(f'{p} not found')
    if not p.is_file():
        raise MyException(f'{p} is not a file')
